﻿@{ Layout = null;}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的竞猜</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no" />
    <link href="~/Content/css/base.css" rel="stylesheet" />
    <link href="~/Content/css/tuoken.css" rel="stylesheet" />
    <link href="~/Content/css/worldcup.css" rel="stylesheet" />
    <link href="~/Content/css/dropload.css" rel="stylesheet" />
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="~/Content/js/base.js"></script>
</head>

<body>
    @*<div class="header">
        <a href="javascript:history.go(-1);">
            <span class="back"></span>
        </a>
        <div class="hdtitle">
            我的竞猜
        </div>
    </div>*@
    <div class="myguess">
        <div class="myguess_list">
            <div class="guesstitle">
                <span>比赛队伍</span>
                <span>竞猜队伍</span>
                <span>胜利队伍</span>
                <span>竞猜次数</span>
                <span>获得红钻</span>
            </div>
            <ul id="playing"></ul>
        </div>
    </div>
    <script src="~/Scripts/dropload.js"></script>
    <script type="text/javascript">
        $(function () {
            var query = { page: 1, size: 10 };
            var dropload = $('#playing').dropload({
                scrollArea: window,
                loadDownFn: function (me) {
                    $.ajax({
                        url: '/ad/_WorldCupRecord', type: "post", data: query,
                        success: function (response) {
                            var paged = $(response).siblings("page");
                            if (paged.length == 1) {
                                query.result += Number.parseInt(paged.attr("rows"));
                                $('#playing').append($(response));
                                $('#playing page').remove();
                                query.page++;
                            } else {
                                me.lock();
                                me.noData();
                            }
                            me.resetload();
                        },
                        error: function (xhr, type) {
                            me.lock();
                            me.noData();
                            me.resetload();
                        }
                    });
                }
            });
        });
    </script>
</body>
</html>